package States 
{
	import Interface.WorldTilemap;
	import org.flixel.FlxG;
	import org.flixel.FlxState;
	
	/**
	 * ...
	 * @author Gregory Weir
	 */
	public class MapState extends FlxState
	{
		private var worldMap:WorldTilemap;
		
		override public function create():void 
		{
			worldMap = new WorldTilemap(World.getWorld());
			this.add(worldMap);
		}
		
		override public function update():void 
		{
			if (FlxG.keys.justPressed("LEFT")) worldMap.x += 32;
			else if (FlxG.keys.justPressed("RIGHT")) worldMap.x -= 32;
			
			if (FlxG.keys.justPressed("UP")) worldMap.y += 32;
			else if (FlxG.keys.justPressed("DOWN")) worldMap.y -= 32;
			
			super.update();
		}
	}

}